package io3;


import java.io.*;

public class PWDemo {
    public static void main(String[] args) throws IOException {
        PrintWriter pw = new PrintWriter("pw.txt");
        pw.println("My name is jiale");
        pw.println("what is your name?");
        System.out.println("写入完毕！");
        pw.close();


//        FileOutputStream fis = new FileOutputStream("pw.txt");
//        OutputStreamWriter osw = new OutputStreamWriter(fis);
//        BufferedWriter bw = new BufferedWriter(osw);
//        bw.write("My name is lisa ");
//        bw.write("What's your name?");
//        System.out.println("写入完毕");
//        bw.close();
    }
}


















